package com.ktgj.flight.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.flight.mapper.ScreeningKeyMapper;
import com.ktgj.flight.domain.ScreeningKey;
import com.ktgj.flight.service.IScreeningKeyService;

/**
 * 短信猫关键字过滤Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-30
 */
@Service
public class ScreeningKeyServiceImpl implements IScreeningKeyService 
{
    @Autowired
    private ScreeningKeyMapper screeningKeyMapper;

    /**
     * 查询短信猫关键字过滤
     * 
     * @param pkid 短信猫关键字过滤ID
     * @return 短信猫关键字过滤
     */
    @Override
    public ScreeningKey selectScreeningKeyById(Long pkid)
    {
        return screeningKeyMapper.selectScreeningKeyById(pkid);
    }

    /**
     * 查询短信猫关键字过滤列表
     * 
     * @param screeningKey 短信猫关键字过滤
     * @return 短信猫关键字过滤
     */
    @Override
    public List<ScreeningKey> selectScreeningKeyList(ScreeningKey screeningKey)
    {
        return screeningKeyMapper.selectScreeningKeyList(screeningKey);
    }

    /**
     * 新增短信猫关键字过滤
     * 
     * @param screeningKey 短信猫关键字过滤
     * @return 结果
     */
    @Override
    public int insertScreeningKey(ScreeningKey screeningKey)
    {
        screeningKey.setCreateTime(DateUtils.getNowDate());
        return screeningKeyMapper.insertScreeningKey(screeningKey);
    }

    /**
     * 修改短信猫关键字过滤
     * 
     * @param screeningKey 短信猫关键字过滤
     * @return 结果
     */
    @Override
    public int updateScreeningKey(ScreeningKey screeningKey)
    {
        return screeningKeyMapper.updateScreeningKey(screeningKey);
    }

    /**
     * 批量删除短信猫关键字过滤
     * 
     * @param pkids 需要删除的短信猫关键字过滤ID
     * @return 结果
     */
    @Override
    public int deleteScreeningKeyByIds(Long[] pkids)
    {
        return screeningKeyMapper.deleteScreeningKeyByIds(pkids);
    }

    /**
     * 删除短信猫关键字过滤信息
     * 
     * @param pkid 短信猫关键字过滤ID
     * @return 结果
     */
    @Override
    public int deleteScreeningKeyById(Long pkid)
    {
        return screeningKeyMapper.deleteScreeningKeyById(pkid);
    }
}
